<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<script type="text/javascript" th:src="@{/js/main.js}"></script>
<!--头部-->
<div class="header" th:fragment="headerbar">
    <div class="header-content">
        <div class="header-icon">
            <div class="logo">
                <a th:href="@{/}"><img th:src="@{/images/logo.png}"/></a><span
                    style="margin-left: 10px">TOP英皇乐理</span>
            </div>
            <div class="login-register">
                <div class="login-user-icon">
                    <div class="user-icon" th:if="${session.studentEntity != null}">
                        <th:block th:if="${session.studentEntity.avatarUrl == null || session.studentEntity.avatarUrl == '' }">
                            <img th:src="@{/images/icon.png}" />
                        </th:block>
                        <th:block th:if="${session.studentEntity.avatarUrl != null && session.studentEntity.avatarUrl != '' }">
                            <img th:src="${session.studentEntity.avatarUrl}" alt="头像"/>
                        </th:block>
                    </div>
                    <div class="user-login-panel" th:if="${session.studentEntity != null}">
                        <div class="top-item">
                        <span th:if="${session.studentEntity.nickName != null && session.studentEntity.nickName != ''}">
                            <i class="layui-icon layui-icon-username"></i><span class="center-item-inner">[[${session.studentEntity.nickName}]]</span>
                        </span>
                            <span th:if="${session.studentEntity.nickName == null || session.studentEntity.nickName == ''}">
                            <i class="layui-icon layui-icon-username"></i><span class="center-item-inner">[[${session.studentEntity.stuName}]]</span>
                        </span>
                            <div class="user-icon">
                                <th:block th:if="${session.studentEntity.avatarUrl == null || session.studentEntity.avatarUrl == '' }">
                                    <img th:src="@{/images/icon.png}" />
                                </th:block>
                                <th:block th:if="${session.studentEntity.avatarUrl != null && session.studentEntity.avatarUrl != '' }">
                                    <img th:src="${session.studentEntity.avatarUrl}" alt="头像"/>
                                </th:block>
                            </div>
                        </div>
                        <!--<div class="center-item" onclick="personCenter()">
                        <span><i class="layui-icon layui-icon-set"></i><span
                                class="center-item-inner">个人中心</span></span>
                        </div>
                        <div class="center-item" onclick="integralList()">
                            <span><i class="layui-icon layui-icon-find-fill"></i><span
                                    class="center-item-inner">我的积分</span></span>
                            <span>[[${session.studentEntity.integral}]]</span>
                        </div>-->
                        <div class="center-item" onclick="car()">
                            <span><i class="layui-icon layui-icon-cart"></i>
                                <span class="center-item-inner">购物车</span>
                            </span>
                        </div>
                        <div class="center-item" onclick="orderList()">
                            <span><i class="layui-icon layui-icon-slider"></i>
                                <span class="center-item-inner">我的订单</span>
                            </span>
                        </div>
                        <div class="logout-item" onclick="logout()">
                        <span><i class="layui-icon layui-icon-logout"></i><span
                                class="logout-item-inner">退出系统</span></span>
                        </div>
                    </div>
                </div>
                <div class="login-block-btn" th:if="${session.studentEntity == null}">
                    <a class="login layui-btn layui-btn-warm" th:href="@{/toLogin}">登录 / 注册</a>
                </div>
            </div>
        </div>
        <div class="header-nav">
            <!--导航下面4个模块-->
            <div class="header-nav-box">
                <div class="nav-box">
                    <a th:class="${active=='paper' ? 'nav-active' : ''}" href="https://abrsmtheory.top/paper">模考题库</a>
                    <a th:class="${active=='special' ? 'nav-active' : ''}" href="https://abrsmtheory.top/special/queryList">专项训练</a>
                    <a th:class="${active=='error' ? 'nav-active' : ''}" href="https://abrsmtheory.top/errorList">错题本</a>
                    <a th:class="${active=='record' ? 'nav-active' : ''}" href="https://abrsmtheory.top/recordList">练习记录</a>
                    <a th:class="${active=='order' ? 'nav-active' : ''}" href="https://abrsmtheory.top/order">会员中心</a>
                    <a th:class="${active=='productList' ? 'nav-active' : ''}" th:href="@{/product/queryList}">书店</a>
                    <a th:class="${active=='competition' ? 'nav-active' : ''}" href="https://abrsmtheory.top/competition/queryList">赛事</a>
                </div>
            </div>
        </div>
    </div>
</div>

<!--尾部-->
<div class="footer" th:fragment="footerbar">
    <div class="footer-wapper">
        <div class="left-conter">
            <div class="info">
                <p style="display: flex;justify-content: space-between;">
                    <span>电话：400-672-8858</span>
                    <span class="about-company">
                        <a th:href="@{/agreement}" target="_blank">社区公约</a>
                        <a th:href="@{/about}" target="_blank">关于我们</a>
                    </span>
                </p>
                <p style="text-align: left"> 邮箱 ：<a href="mailto:2933695632@qq.com">2933695632@qq.com</a></p>
                <p style="text-align: left">地址 ：中国 · 合肥</p>
                <p style="color: rgb(152 152 152);font-size: 14px;text-align: left">
                    版权所有 © 英皇乐理模拟考试 2022
                    <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">皖ICP备20005574号</a></p>
            </div>
        </div>
    </div>
</div>
